<template>
  <div>
    <detail-banner></detail-banner>
    <detail-header></detail-header>
    <detail-list :list="list"></detail-list>
    <div style="height: 50rem"></div>
  </div>
</template>

<script>
  import DetailBanner from './components/banner'
  import DetailHeader from './components/header'
  import DetailList from './components/list'
  import axios from 'axios'

  export default {
    name: 'detail',
    components: {
      DetailBanner,
      DetailHeader,
      DetailList
    },
    data () {
      return {
        list: [{
          title: '成人票'
        }, {
          title: '学生票'
        }, {
          title: '儿童票'
        }, {
          title: '特惠票'
        }]
      }
    },
    methods: {
      getDetailInfo () {
        axios.get('/static/mock/detail.json' ,{params:{id:this.$route.params.id}}).then(this.handleGetDataSucc)
      },
      handleGetDataSucc(res){
        res=res.data
        if(res.ret && res.data){
          const data = res.data
          console.log(data)
        }
      }
    },
    mounted () {
      this.getDetailInfo()
    }
  }
</script>

<style scoped lang="stylus">

</style>
